package com.visitor.pattern;

/**
 * @author chenchen
 * @description 具体访问者
 * @date 2023/11/10 9:36
 */
public class ConcreteVisitor1 extends Visitor {
    @Override
    public void visitConcreteElementA(ConcreteElementA concreteElementA) {
        System.out.println(concreteElementA.getClass().getSimpleName() + "被：" + this.getClass().getSimpleName() + "访问了");
    }

    @Override
    public void visitConcreteElementB(ConcreteElementB concreteElementB) {
        System.out.println(concreteElementB.getClass().getSimpleName() + "被：" + this.getClass().getSimpleName() + "访问了");
    }
}
